clientserver:clientserver.cc ../mqcommon/mq_msg.pb.cc ../mqcommon/mq_proto.pb.cc ../third/include/muduo/proto/codec.cc
	g++ -g -o $@ $^ -std=c++17 -I../third/include -L../third/lib -lsqlite3 -lgtest -lprotobuf  -lmuduo_base -lmuduo_net -lz

brokersever:brokersever.cc ../mqcommon/mq_msg.pb.cc ../mqcommon/mq_proto.pb.cc ../third/include/muduo/proto/codec.cc
	g++ -g -o $@ $^ -std=c++17 -I../third/include -L../third/lib -lsqlite3 -lgtest -lprotobuf  -lmuduo_base -lmuduo_net -lz

connection:connection.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -I../third/include -L../third/lib -lsqlite3 -lgtest -lprotobuf  -lmuduo_base -lmuduo_net -lz

channeltest:channeltest.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -I../third/include -L../third/lib -lsqlite3 -lgtest -lprotobuf  -lmuduo_base -lmuduo_net -lz

consumer:consumer.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -lsqlite3 -lgtest -lprotobuf

routetest:routetest.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -lsqlite3 -lgtest -lprotobuf

hosttest:hosttest.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -lsqlite3 -lgtest -lprotobuf

messagetest:messagetest.cc ../mqcommon/mq_msg.pb.cc
	g++ -g -o $@ $^ -std=c++17 -lsqlite3 -lgtest -lprotobuf

test:test.cc
	g++ -g -o $@ $^ -std=c++11 -lsqlite3 -lgtest -lprotobuf

bindingtest:bindingtest.cc
	g++ -g -o $@ $^ -std=c++11 -lsqlite3 -lgtest -lprotobuf

msgqueuetest:msgqueuetest.cc
	g++ -g -o $@ $^ -std=c++11 -lsqlite3 -lgtest -lprotobuf

exchangtest:exchangtest.cc
	g++ -g -o $@ $^ -std=c++11 -lsqlite3 -lgtest -lprotobuf

.PHONY:clean
clean:
	 rm -f exchangtest msgqueuetest bindingtest messagetest test hosttest routetest consumer channeltest connection brokersever
